//package xl.util;
//
//import org.springframework.dao.DataAccessException;
//import org.springframework.http.ResponseEntity;
//import org.springframework.web.ErrorResponse;
//import org.springframework.web.bind.annotation.ControllerAdvice;
//import org.springframework.web.bind.annotation.ExceptionHandler;
//
//@ControllerAdvice
//public class GlobalExceptionHandler {
//    @ExceptionHandler(DataAccessException.class)
//    public ResponseEntity<ErrorResponse> handleDatabaseError() {
//        return ResponseEntity.status(500)
//                .body(new ErrorResponse("系统暂时无法访问订单数据"));
//    }
//
//    @ExceptionHandler(SecurityException.class)
//    public ResponseEntity<ErrorResponse> handleSecurityError(SecurityException e) {
//        return ResponseEntity.status(403)
//                .body(new ErrorResponse(e.getMessage()));
//    }
//}
//
